﻿<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <style type="text/css">
        .draggable, .draggable2 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
        .droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />

    <asp:Panel ID="DraggablePanel" runat="server" CssClass="ui-widget-content draggable">
        <p>
            I revert when I'm dropped</p>
    </asp:Panel>
    <asp:Panel ID="DraggablePanel1" runat="server" CssClass="ui-widget-header draggable2">
        <p>
            I revert when I'm not dropped</p>
    </asp:Panel>
    <asp:Panel ID="DroppablePanel" runat="server" CssClass="ui-widget-header droppable">
        <p>
            Drop me here</p>
    </asp:Panel>
    <DotNetAge:Draggable ID="Draggable1" runat="server" Revert="Valid">
        <Target TargetID="DraggablePanel" />
    </DotNetAge:Draggable>
    <DotNetAge:Draggable ID="Draggable2" runat="server" Revert="Invalid">
        <Target TargetID="DraggablePanel1" />
    </DotNetAge:Draggable>
    <DotNetAge:Droppable ID="Droppable1" runat="server" OnClientDrop="$(this).addClass('ui-state-highlight').find('p').html('Dropped!');">
        <Target TargetID="DroppablePanel" />
    </DotNetAge:Droppable>
    </form>
</body>
</html>
